﻿using System;
using log4net;

namespace PlayLog4Net
{
    static class TestXmlConfig
    {
        private static void GetStarted()
        {
            ILog logger = IntializeLogger();

            int total = 5;
            logger.PrintDebug(total);
        }

        private static ILog IntializeLogger()
        {
            log4net.Config.XmlConfigurator.Configure();
            return LogManager.GetLogger(typeof(TestXmlConfig));
        }

        private static void TestRollingFileAppender()
        {
            ILog logger = IntializeLogger();

            int totalLoop = 10;
            for (int index = 0; index < totalLoop; index++)
            {
                logger.PrintDebug(100);
            }
        }

        public static void TestMain()
        {
            GetStarted();
            // TestRollingFileAppender();
        }
    }
}
